package cn.com.pet.common.serviceImpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.pet.common.dao.PetMapper;
import cn.com.pet.common.entity.Pet;
import cn.com.pet.common.entity.PetType;
import cn.com.pet.common.service.PetService;

@Service("petService")
public class PetServiceImpl implements PetService {

	@Autowired
	PetMapper petMapper;

	@Override
	public List<Pet> getPetByPetTypeId(PetType pt) {
		return petMapper.getPetByPetTypeId(pt);
	}

	@Override
	public int addPet(Pet p) {
		return petMapper.addPet(p);
	}

	@Override
	public int deletePet(Pet p) {
		return petMapper.deletePet(p);
	}

	@Override
	public int updatePet(Pet p) {
		return petMapper.updatePet(p);
	}

	@Override
	public List<Pet> findAllPet(Map<String, String> parameter) {
		return petMapper.findAllPet(parameter);
	}

	@Override
	public Pet findPetById(Pet p) {
		return petMapper.findPetById(p);
	}

	@Override
	public int updateHots(Pet p) {
		return petMapper.updateHots(p);
	}

}
